# # my_app/serializers.py

# from rest_framework import serializers
# # from .models import UserProfile

# # class UserProfileSerializer(serializers.ModelSerializer):
# #     class Meta:
# #         model = UserProfile
# #         # 指定需要序列化和反序列化的字段
# #         fields = ['id', 'name', 'age']